<template>
    <div class="zhifaxinxi">
        <ModalTitle title="执法信息资源综合分析"></ModalTitle>
        <section class="zhifaxinxi-box">
            <div class="box-left">
                <span class="box-title">{{ type }}</span>
                <p v-for="(item,index) in dataLIst" :key="index">
                    <span>{{item.name }}</span>
                    <span v-if="item.name !== '排行'">{{item.count }}兆</span>
                    <span v-else>{{item.count }}名</span>
                </p>
            </div>

            <div class="box-right">
                <span class="box-title">{{ type2 }}</span>
                <p v-for="(item,index) in dataLIst2" :key="index">
                    <span >{{item.name }}</span>
                    <span v-if="item.name !== '排行'">{{item.count }}兆</span>
                    <span v-else>{{item.count }}名</span>
                </p>
            </div>
        </section>
    </div>
</template>

<script>
import ModalTitle from '@/components/ModalTitle/Index.vue'
import { ZongHeZhiFaYunXDB } from '@/api/zhangzi'

export default {
    components: {
        ModalTitle
    },
    data() {
        return {
            dataLIst:[],
            type: '',
            type2: '',
            dataLIst2: []
        }
    },
    mounted() {
        this.ResourcesList()
    },
    methods: {
        // 执法信息资源综合分析
        ResourcesList() {
            ZongHeZhiFaYunXDB.zongheZhiFaAPI().then(res => {
                console.log(res, '执法信息资源综合分析')
                if (res.code == 200) {
                    this.type = res.data[0].type
                    this.type2 = res.data[1].type
                    this.dataLIst = res.data[0].informationResources2
                    this.dataLIst2 = res.data[1].informationResources
                }
            })
        }
    }
}
</script>

<style lang="less" scoped>
.zhifaxinxi {
    width: 100%;
    height: 31.5rem;

    .zhifaxinxi-box {
        width: 100%;
        margin-top: 1.6rem;
        display: flex;
        justify-content: space-between;

        >div {
            width:  21.7rem;
            height: 22.1rem;
            padding: 1.7rem;

            span {
                display: inline-block;
            }

            .box-title {
                font-size: 2rem;
                font-family: PingFang SC;
                font-weight: 400;
                color: #00FFFA;
                margin-bottom: 1.5rem;
            }

            p {
                display: flex;
                align-items: center;
                justify-content: space-between;
                height: auto;
                margin-bottom: 1.2rem;

                &:last-child {
                    margin: 0;
                }

                span {
                    font-size: 1.4rem;
                    font-family: PingFang SC;
                    font-weight: 400;
                    color: #FFFFFF;

                    &:nth-child(2) {
                        color: #42AD0D;
                    }
                }
            }
        }

        .box-left {
            background: url('../../../assets/images/zhangzi/yunxingzhishu/bg1.png') no-repeat;
            background-size: 100% 100%;
        }

        .box-right {
            background: url('../../../assets/images/zhangzi/yunxingzhishu/bg2.png') no-repeat;
            background-size: 100% 100%;

            .box-title {
                color: #00ADF6;
            }
        }
    }
}
</style>